<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>打印预览</title>
<link rel="stylesheet" href="${Domain}common/weui/css/weui.min.css">
<link rel="stylesheet" href="${Domain}common/amazeui/css/amazeui.min.css" />
<script src="${Domain}common/amazeui/js/jquery.min.js"></script>
<script type="text/javascript" src="${Domain}common/js/jquery.form.min.js"></script> 
<script src="${Domain}common/amazeui/js/amazeui.min.js"></script>
<script src="${Domain}common/weui/js/weui.min.js"></script>
<style type="text/css">
.tngou-input-bottom{
border: 0;
border-bottom: 1px solid rgba(0, 0, 0, 1);
}
.tngou-input
{
border: 0;
}

.am-table .tngou-thead  th {
    border:0px;
    padding:0px;
    width: 8.333333333%;
}

</style>
</head>
<body style="background-color: #999;">
<div class="am-container" style="width:794px;background-color: #FFFFFF;min-height: 1090px">
<div class="am-g" >
<div class=" am-print-hide am-text-sm am-fr " >
用时：<i id="usetimeshow">0</i>秒 
</div>
</div>
<h3 align="center" class="am-margin-top-lg">
${survey.name}
</h3>
 <#if survey.type=1>
<div class="am-u-sm-12">
<div class="am-fl">
<strong>姓名：</strong><input type="text"  class="tngou-input-bottom">
</div>
<div class="am-fr">
<strong>编号：</strong><input type="text"  class="tngou-input-bottom">
</div>
</div>
</#if>
<div class="am-g" >
<form class="am-u-sm-12 am-margin-top-lg"  method="post" action="${Domain}api/access/update" id="iask">
<input type="hidden" id="usetime" name="usetime" value=""> 
<input type="hidden" id="access" name="access" value="${access.id}">
<table class="am-table  am-table-bordered " >

   		
  
    <tbody>
   		<tr class="tngou-thead"><th></th><th></th><th></th><th></th><th></th><th></th><th></th><th></th><th></th><th></th><th></th><th></th><th></th><th></th> </tr>
        <tr class="tngou-thead"><th></th><th></th><th></th><th></th><th></th><th></th><th></th><th></th><th></th><th></th><th></th><th></th><th></th><th></th> </tr>
        <tr>
            <td colspan="2" align="center">姓名</td>
            <td colspan="4"><input type="text" class="tngou-input"></td>
            <td colspan="2" align="center">性别</td>
            <td colspan="4">          
	           <label class="am-checkbox-inline">
			    <input type="checkbox" name="sex"  value="1"  data-am-ucheck> 男
			  </label>
			  <label class="am-checkbox-inline">
			    <input type="checkbox" name="sex"  value="2"  data-am-ucheck > 女
			  </label>
 
		  </td>
        </tr>
        <tr>
            <td colspan="2" align="center">出生日期</td>
            <td colspan="4"><input type="text" class="tngou-input"></td>
            <td colspan="2" align="center">年龄</td>
            <td colspan="4"><input type="text" class="tngou-input"></td>
        </tr>
        <tr>
            <td colspan="2" align="center">身份证号</td>
            <td colspan="4"><input type="text" class="tngou-input"></td>
            <td colspan="2" align="center">名族</td>
            <td colspan="4"><input type="text" class="tngou-input"></td>
        </tr>        
        <tr>
            <td colspan="2" align="center">本人电话</td>
            <td colspan="4"><input type="text" class="tngou-input"></td>
            <td colspan="2" align="center">其他联系</td>
            <td colspan="4"><input type="text" class="tngou-input"></td>
        </tr>
        <tr>
            <td colspan="2" align="center">户籍地址</td>
            <td colspan="10"><input type="text" class="tngou-input"></td> 
        </tr>
        
        <#if survey.type=2>
        <tr>
            <td colspan="2" align="center">现居地址</td>
            <td colspan="10"><input type="text" class="tngou-input"></td> 
        </tr>
        <tr>
            <td colspan="2" align="center">诊断疾病</td>
            <td colspan="4"><input type="text" class="tngou-input"></td>
            <td colspan="2" align="center">部位</td>
            <td colspan="4"><input type="text" class="tngou-input"></td>
        </tr>
         <tr>
            <td colspan="2" align="center">确诊时间</td>
            <td colspan="4"><input type="text" class="tngou-input"></td>
            <td colspan="2" align="center">就诊编号</td>
            <td colspan="4"><input type="text" class="tngou-input"></td>
        </tr>
        <tr>
            <td colspan="2" align="center">治疗科室</td>
            <td colspan="10"><input type="text" class="tngou-input"></td> 
        </tr>
         <tr>
            <td colspan="2" align="center">主管医生</td>
            <td colspan="10"><input type="text" class="tngou-input"></td> 
        </tr>
        
        </#if>
        <#list trs as tr>
        <tr>
        <#list tr as td>
        
        <td  colspan="${td.colspan}"  rowspan="${td.rowspan}" <#if td.align==1>align="center"</#if> >
      	<#switch td.type>
		<#case 0>${td.tag}<#break>
		<#case 1> ${td.name}<#break>
		<#case 2>
		     <#switch td.qusetiontype>
		     <#case 0>
			     <label class="am-checkbox-inline">
				    <input type="radio" name="${td.id}"  value="1"  data-am-ucheck <#list td.values as v> <#if v.value==1>checked</#if> </#list> > 是
				  </label>
				  <label class="am-checkbox-inline">
				    <input type="radio" name="${td.id}"   value="0"  data-am-ucheck <#list td.values as v> <#if v.value==0>checked</#if> </#list>> 否
				  </label>
				  
			  <#break>
			   <#case 1>
				   <#list td.list as item>
			      <label class="am-checkbox-inline">
				    <input type="radio" name="${td.id}"   value="${item.value}"  data-am-ucheck <#list td.values as v><#if v.value==item.value>checked</#if></#list>> ${item.name}
				  </label>
				 </#list>
			  <#break>
			  <#case 2>
				   <#list td.list as item>
			      <label class="am-checkbox-inline">
				    <input type="checkbox"  name="${td.id}"   value="${item.value}"  data-am-ucheck <#list td.values as v><#if v.value==item.value>checked</#if></#list>> ${item.name}
				  </label>
				 </#list>
			  <#break>
		     <#case 3>
				   <#list td.list as item>
			      <input type="number" style="width:33.3%" name="${td.id}" value="<#list td.values as v>${v.value}</#list>" class="tngou-input">${item.name}
				 </#list>
			  <#break>
			  <#case 4>
			      <input type="text" style="width:80%" name="${td.id}"  value="<#list td.values as v>${v.description}</#list>"  class="tngou-input">
			  <#break>
		     <#default>
		        <input type="text" style="width:80%"    class="tngou-input">
		     </#switch>
		<#break>
		<#default>
		</#switch>
       
        
        </td>
        </#list>
        </tr>
        </#list>
         <tr>
             <td colspan="2" align="center">受访关系</td>
            <td colspan="10">
           	<label class="am-checkbox-inline">
			    <input type="checkbox"  value="0"  data-am-ucheck> 自己
			  </label>
			  <label class="am-checkbox-inline">
			    <input type="checkbox"   value="1" data-am-ucheck> 夫妻
			  </label>			  
			  <label class="am-checkbox-inline">
			    <input type="checkbox"   value="2" data-am-ucheck> 子女
			  </label>
			  <label class="am-checkbox-inline">
			    <input type="checkbox"   value="3" data-am-ucheck> 父母
			  </label>
			  <label class="am-checkbox-inline">
			    <input type="checkbox"   value="4" data-am-ucheck> 亲人
			  </label>	
			  <label class="am-checkbox-inline">
			    <input type="checkbox"   value="5" data-am-ucheck> 朋友
			  </label>		
            </td> 
        </tr>
         <tr>
            <td colspan="2" align="center">建档日期</td>
            <td colspan="2"><input type="text" style="width:80%" class="tngou-input"></td>
            <td colspan="2" align="center">建档机构</td>
            <td colspan="2"><input type="text" style="width:80%" class="tngou-input"></td>
		  <td colspan="2" align="center">建档人</td>
            <td colspan="2"><input type="text" style="width:80%" class="tngou-input"></td>
        </tr>
    </tbody>
</table>

<div class="am-g" >
<div class=" am-print-hide am-margin-top-sm am-u-sm-4 am-u-sm-centered" >

<button type="submit" class="am-btn  am-btn-warning am-btn-block" >保存数据</button>
</div>
</div>
<br><br>
</form>
</div>


</div>
<script type="text/javascript">
var loading; 
var usetime=0;
  var int;//定时器
//设置时间
function settime()
{
    usetime=usetime+1;
   $("#usetime").val(usetime*1000)
    $("#usetimeshow").text(usetime)
}
$(function() {
  
  
  int=setInterval("settime()",1000) ;  
  $('#iask').validator({
    onValid: function(validity) {   
      $(validity.field).closest('.am-form-group').find('.am-alert').hide();
    },
    onInValid: function(validity) {
   
      var $field = $(validity.field);
      var $group = $field.closest('.am-form-group');
      var $tpl = $group.find('.tpl-form-input');
      var $alert = $group.find('.am-alert');
      // 使用自定义的提示信息 或 插件内置的提示信息
      var msg = $tpl.data('validationMessage') || this.getValidationMessage(validity);
      if (!$alert.length) {
        $alert = $('<div class="am-alert am-alert-danger"></div>').hide().
          insertAfter($tpl);
      }

      $alert.html(msg).show();
    }
  });
});
  
  
   $('#iask').ajaxForm({
	    beforeSubmit: function(a,f,o) {
	        loading=weui.loading('数据加载中...');
	    },
	    success: function(json) {	    	
	    	if(json.status)
	    	{
	    	  	if(loading)loading.hide();
	    		weui.toast(json.msg); 
	    	}else
	    	{	
	    		if(loading)loading.hide();
	    	    weui.alert(json.msg);  		 
	    	}
	    }
	});
	</script>


</body>
</html>